import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';

class AddButton extends StatelessWidget {
  final String title;
  final VoidCallback onTap;
  final Widget right;

  const AddButton({Key key, this.title, this.onTap, this.right})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return PressedOpacityButton(
      onPressed: onTap,
      child: Row(
        mainAxisSize: MainAxisSize.max,
        children: [
          Container(
            width: getDp(24),
            height: getDp(24),
            alignment: Alignment.center,
            decoration: BoxDecoration(
              shape: BoxShape.circle,
              color: aceBlueColor,
            ),
            child: Image.asset(
              A.assetsImagesStyleAdd,
              width: getDp(12.5),
              height: getDp(12.5),
              fit: BoxFit.contain,
            ),
          ),
          SizedBox(
            width: 12,
          ),
          Text(
            title,
            style: TextStyle(
              color: aceBlueColor,
              fontSize: getSp(16),
              fontWeight: FontWeight.w700,
              height: 1,
            ),
          )
        ],
      ),
    );
  }
}
